package com.medata.service.impl;

import com.medata.dataObject.Logdispprj;
import com.medata.repository.LogdispprjRepository;
import com.medata.service.LogdispprjService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.sql.Timestamp;

/**
 * @author ：zb
 * @date ：Created in 2019/7/8 0008 10:12
 * @description：
 */
@Service
public class LogdispprjServiceImpl implements LogdispprjService {
    @Autowired
    LogdispprjRepository repository;

    @Override
    @Transactional
    public void deleteByLogtimeBetweenAndActionid(Timestamp startTime, Timestamp endTime, String actionid) {
        repository.deleteByLogtimeBetweenAndActionid(startTime,endTime,actionid);
    }

    @Override
    public Page<Logdispprj> findByLogtimeBetweenAndActionid(Timestamp startTime, Timestamp endTime, String actionid, Pageable pageable) {
        return repository.findByLogtimeBetweenAndActionid(startTime,endTime,actionid,pageable);
    }
}
